package com.dux.example.easyyapi.dto;

/**
 * 响应结果包装类
 */
public class Result<T> {
    /**
     * 处理成功的标识: true-成功，false-失败
     * @required
     * @mock true
     */
    private boolean success;
    /**
     * 处理消息
     * @required
     * @mock 处理成功
     */
    private String message;
    /**
     * 处理数据
     */
    private T data;

    public Result() {
        this.success = true;
        this.message = "处理成功";
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
